Training data increment method, electronic apparatus and computer-readable medium

ABSTRACT

A training data increment method, an electronic apparatus and a computer-readable medium are provided. The training data increment method is adapted for the electronic apparatus and includes the following steps. A training data set is obtained, wherein the training data set includes a first image and a second image. An incremental image is generated based on the first image and the second image. A deep learning model is trained based on the incremental image.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of Taiwan applicationserial no. 109120137, filed on Jun. 16, 2020. The entirety of theabove-mentioned patent application is hereby incorporated by referenceherein and made a part of this specification.

BACKGROUND OF THE DISCLOSURE 1. Field of the Disclosure

The disclosure relates to an object detection technology, and inparticular to a training data increment method, an electronic apparatusand a computer-readable medium for object detection.

2. Description of Related Art

In recent years, operation devices is getting more and more refined,resulting in the prevalence of neural networks of deep learning thatrequire a large amount of operation. The neural network of deep learninglearns through massive data, thus making a great breakthrough in theaccuracy in image recognition, natural language and other fields.Particularly, the image recognition technology of deep learning is alsointegrated into production lines industrially to identify the yield rateof the output objects, thereby improving the yield rate of the producedproducts.

However, the neural network of deep learning needs to learn throughmassive marked data, and the marked data usually needs to be markedmanually, causing the consumption of time and manpower. Moreover, theimbalance of the amount of data in different training categories alsoaffects the prediction accuracy of deep learning. Therefore, inpractice, the neural network of deep learning cannot be easily applieddirectly. For example, if you want to apply deep learning imagerecognition to the defect detection of product elements, while sampleswith defects are very few and the coverage is insufficient, it may makethe defect detection accuracy insufficient to reach the stage of use.Therefore, how to increase appropriate training data is a topicconcerned by those skilled in the art.

SUMMARY OF THE DISCLOSURE

In view of this, the disclosure provides a training data incrementmethod, an electronic apparatus and a computer-readable medium, whichcan increase the amount of data for training a deep learning model toimprove the object defect detection accuracy.

An embodiment of the disclosure provides a training data incrementmethod, adapted to an electronic apparatus. The method includes thefollowing steps. A training data set is obtained, where the trainingdata set includes a first image and a second image. An incremental imageis generated based on the first image and the second image. A deeplearning model is trained based on the incremental image.

An embodiment of the disclosure provides an electronic apparatus,including a storage apparatus and a processor. The processor is coupledto the storage apparatus and is configured to execute instructions inthe storage apparatus to perform the following steps. A training dataset is obtained, where the training data set includes a first image anda second image. An incremental image is generated based on the firstimage and the second image. A deep learning model is trained based onthe incremental image.

An embodiment of the disclosure provides a non-transitorycomputer-readable medium, recording programs and loaded in theelectronic apparatus to perform the following steps. A training data setis obtained, where the training data set includes a first image and asecond image. An incremental image is generated based on the first imageand the second image. A deep learning model is trained based on theincremental image.

Based on the above, in the embodiments of the disclosure, theincremental image is generated based on a vector relationship betweenthe first image and the second image. By training the deep learningmodel using the incremental image, the object defect detection accuracyof the deep learning model can be improved.

In order to make the above features and advantages of the disclosurecomprehensible, the disclosure is described in detail below throughembodiments with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an electronic apparatus according to anembodiment of the disclosure.

FIG. 2 is a flowchart of a training data increment method according toan embodiment of the disclosure.

FIG. 3 is a flowchart of generating a prediction model according to anembodiment of the disclosure.

FIG. 4 is a schematic diagram of image preprocessing according to anembodiment of the disclosure.

FIG. 5 is a flowchart of a training data increment method according toan embodiment of the disclosure.

FIG. 6 is a schematic diagram of a registration field according to anembodiment of the disclosure.

FIG. 7 is a schematic diagram of image preprocessing according to anembodiment of the disclosure.

FIG. 8 is a flowchart of a training data increment method according toan embodiment of the disclosure.

FIG. 9 is a schematic diagram of a registration field according to anembodiment of the disclosure.

FIG. 10 is a schematic diagram of generating a training image accordingto an embodiment of the disclosure.

DESCRIPTION OF THE EMBODIMENTS

Some embodiments of the disclosure are described in detail below withreference to the accompanying drawings. Reference numerals referenced inthe following description are regarded as identical or similar elementswhen identical reference numerals appear in different drawings. Theembodiments are only a part of the disclosure, and do not disclose allimplementable manners of the disclosure. More exactly, the embodimentsare only examples of the method and the system in the scope of theclaims of the disclosure.

FIG. 1 is a block diagram of an electronic apparatus according to anembodiment of the disclosure. However, it is only for convenience ofdescription and is not intended to limit the disclosure. With referenceto FIG. 1, an electronic apparatus 100 includes a processor 110 and astorage apparatus 120. The electronic apparatus 100 may be coupled to animage capturing apparatus (not shown), receive an image taken by theimage capturing apparatus, and store the taken image into the storageapparatus 120. The image capturing apparatus is configured to captureimages from a space, and includes a camera lens with a lens and aphotosensitive element. The photosensitive element is configured tosense an intensity of light entering the lens to generate an image. Thephotosensitive element may be, for example, a charge coupled device(CCD), a complementary metal-oxide semiconductor (CMOS) element, orother elements. In an embodiment, the image capturing apparatus isconfigured to capture images of an element to be detected to generate atraining data set.

The electronic apparatus 100 is, for example, a notebook computer, adesktop computer, a server apparatus, or other computer apparatuses withcomputing ability, and the disclosure is not limited thereto. Theelectronic apparatus 100 may receive a plurality of images from theimage capturing apparatus via a data transmission interface. In anembodiment, the electronic apparatus 100 may be configured to performimage processing on the image captured by the image capturing apparatus,and detect defects in the image through the deep learning model.

The processor 110 is coupled to the storage apparatus 120, such as acentral processing unit (CPU), or other programmable general-purpose orspecial-purpose microprocessors, a digital signal processor (DSP), aprogrammable controller, an application specific integrated circuit(ASIC), a programmable logic device (PLD), a graphics processing unit(GPU) or other similar apparatuses or a combination of theseapparatuses. The processor 110 may execute program codes, softwaremodules, instructions and the like recorded in the storage apparatus120.

The storage apparatus 120 is configured to store data such as images,codes, and software elements. It may be, for example, any type of fixedor removable random access memory (RAM), a read-only memory (ROM), aflash memory, a hard disk or other similar apparatuses, an integratedcircuit, and a combination thereof.

FIG. 2 is a flowchart of a training data increment method according toan embodiment of the disclosure. With reference to FIG. 2, the methodaccording to the embodiment is adapted to the electronic apparatus 100in FIG. 1. The detailed flow of the method according to the embodimentis described below in conjunction with various elements in theelectronic apparatus 100.

First, at step S202, the processor 110 obtains a training data set, andthe training data set includes a plurality of images. In an embodiment,the training data set includes at least a first image and a secondimage. Specifically, the processor 110 obtains a plurality of originaltraining images in the training data set, and labels image categories ofthe original training images. In other words, these original trainingimages have been assigned solution categories. For example, there may betwo image categories, namely a defective image and a non-defectiveimage, but the disclosure is not limited thereto.

In an embodiment, the first image and the second image may be twooriginal training images among the plurality of images generated by theimage capturing device. Alternatively, in another embodiment, the firstimage and the second image may be generated after the processor 110performs image processing on two original training images among theplurality of images. Here, image categories of the first image and thesecond image are the same as that of the original training image beforeprocessing. The image processing above may be an operation such as imagecutting, rotation, noise reduction processing, saturation adjustment, orbrightness adjustment. In the embodiment, the processor 110 may capturethe first image and the second image from the original training imagesbased on a region of interest (ROI). By setting the region of interest,an image block (i.e., the first image or the second image) that needs tobe focused on in the original training image can be circled, and thisimage block can be used for subsequent processing to generate a newimage block.

At step S204, the processor 110 generates a vector field associated witha plurality of pixels of the second image based on the first image. Atstep S206, the processor 110 generates an incremental image based on thefirst image and the vector field. Specifically, the processor 110 inputsthe first image and the second image into an image increment model, andgenerates an incremental image. Here, the image increment model includestwo parts, namely an image coding model and spatial transform. At thesame time, the processor 110 determines an image category of thegenerated incremental image based on image categories of a moving imageand a fixed image. In an embodiment, if the image category of one of themoving image and the fixed image is a defective image, the processor 110labels the image category of the generated incremental image as adefective image. In other words, if the image categories of the movingimage and the fixed image are both non-defective images, the processor110 labels the image category of the generated incremental image as anon-defective image.

In detail, in step S204 of generating the vector field, the processor110 establishes a pixel-to-pixel corresponding relationship between agroup of first images and second images using the image coding model.The processor 110 sets the first image and the second image as themoving image and the fixed image, respectively. For convenience ofdescription, it is assumed here that the first image is the moving imageand the second image is the fixed image. Here, the processor 110 inputsthe moving image and the fixed image into the image increment model, andminimizes an objective function of the vector field to generate aregistration field (ψ) corresponding to the moving image and the fixedimage. ψ is a vector field, and the vector field is associated with apixel-to-pixel displacement vector between the moving image and thefixed image. In a domain of the vector field, each point in the spacehas a set of two-dimensional vectors. If this vector field is describedas a function, all parts in the vector field are continuous anddifferentiable. In other words, if one point is placed anywhere in thevector field, the point will move along the vector field.

Therefore, in step S206, the processor 110 may perform a spatialtransform operation using the generated registration field and themoving image to generate an incremental image. Specifically, theprocessor 110 may determine a moving position of each pixel in themoving image using the registration field to generate the incrementalimage. In an embodiment, the processor may perform the spatial transformoperation using the following Formula (1):m∘Ø(p)=Σ_(q∈z(p′)) m(q)Π_(d∈(x,y))1−|p′ _(d) −q _(d)|  (1)

where p is each pixel in m. p′=p+u(p), where u(p) is spatial gradientdisplacement of p. z(p′) represents all neighboring pixels of p′. q isone of the neighboring pixels of p′. m(q) is a q pixel in the image m. dis spatial dimension {x, y}.

In addition, in an embodiment, the objective function minimized by theprocessor 110 when the image increment model is trained is, for example,smoothness of the vector field w and a similarity between the movingimage and the fixed image. Through the objective function, it can beensured that the generated registration field is smooth and continuousto confirm the deformation occurring in practice. The processor 110, forexample, may set the following Formula (2) as a loss function:

_(us)(f,m,Ø)=

_(sim)(F,m∘Ø)+λ

_(smooth)(Ø)  (2)

where λ is a regularization parameter.

_(sim)(f, m∘Ø) is a loss function of the similarity between the movingimage and the fixed image. In an embodiment, for example, the followingFormula (3) can be used for derivation:

$\begin{matrix}{{L_{sim}\left( {f,{m \circ \varnothing}} \right)} = \frac{\left( {\sum\limits_{p_{i}}{\left( {{f\left( p_{i} \right)} - {\overset{\hat{}}{f}(p)}} \right)\left( {{\left\lbrack {m \circ \varnothing} \right\rbrack\left( p_{i} \right)} - {\left\lbrack {\overset{\hat{}}{m} \circ \varnothing} \right\rbrack(p)}} \right)}} \right)^{2}}{\left( {\sum\limits_{p_{i}}\left( {{f\left( p_{i} \right)} - {\overset{\hat{}}{f}(p)}} \right)^{2}} \right)\left( {\sum\limits_{p_{i}}\left( {{\left\lbrack {m \circ \varnothing} \right\rbrack\left( p_{i} \right)} - {\left\lbrack {\hat{m} \circ \varnothing} \right\rbrack(p)}} \right)^{2}} \right)}} & (3)\end{matrix}$

where

_(smooth)(Ø) is a loss function of the smoothness of the vector field ψ.In an embodiment, for example, the following Formula (4) can be used forderivation:

_(smooth)(Ø)=Σ_(p∈Ω) ∥∇u(p)∥²  (4)

where

${{\nabla{u(p)}} = \left( {\frac{\partial{u(p)}}{\partial x},\frac{\partial{u(p)}}{\partial y}} \right)},$u(p) is spatial gradient displacement of p.

In an embodiment, the image coding model may be implemented using a Unetmodel or other similar models in a convolutional neural network (CNN)architecture.

At step S208, the processor 110 trains the deep learning model based onthe incremental image. Specifically, the processor 110 builds the deeplearning model in advance and stores the deep learning model in thestorage apparatus 120. The processor 110 may train the deep learningmodel based on the images included in the training data set and/or theincremental image generated according to the foregoing steps and theimage categories corresponding to these images. In addition, theprocessor 110 stores model parameters of the trained deep learning model(such as the number of neural network layers and the weight of eachneural network layer) in the storage apparatus 120. In an embodiment,the deep learning model is, for example, a VGG model used forclassification among the convolution neural network (CNN) models,ResNet, DenseNet and the like.

At step S210, the processor 110 performs an image detection programusing the trained deep learning model. Specifically, when performing theimage detection program, the processor 110 may receive an image andinput the image to the trained deep learning model. The trained deeplearning model first performs feature capture on the image to generate afeature vector. Each dimension in this feature vector is used torepresent a certain feature in the image. Then, these feature vectorswill be input to a classifier in the trained deep learning model, andthe classifier will classify according to these feature vectors, andthen identify whether the images belong to the image category ofdefective images or non-defective images.

FIG. 3 is a flowchart of generating a prediction model according to anembodiment of the disclosure. The neural network of deep learning needsto learn through massive data. However, in the actual operation ofproduction lines or other fields, the image samples with defects arefewer and the coverage is insufficient. Moreover, the imbalance of theamount of data in different image categories also affects the predictionaccuracy of the trained deep learning model. Based on this, withreference to FIG. 3, the steps in an embodiment include, but are notlimited to, training data collection 301, image preprocessing 302, dataincrement 303 and prediction model training 304. By the data increment303 method provided by the disclosure, these embodiments add anaugmented incremental image to the prediction model, which can improvethe prediction accuracy of the prediction model.

The specific implementation content of the training data incrementmethod provided by the disclosure will be described in detail below withdifferent embodiments, respectively.

In an embodiment, the description is made by detecting whether aStinifer hole in the middle of the image is defective, for example, isdamaged or dirty. FIG. 4 is a schematic diagram of image preprocessingaccording to an embodiment of the disclosure. In FIG. 4, first, theprocessor 110 obtains a training data set. The training data setincludes a plurality of original training images labeled as thedefective images and the non-defective images, respectively. Theprocessor 110 then performs image preprocessing on the plurality oforiginal training images to obtain a plurality of processed images. Withan original training image Img40 in the training data set as an example,the processor 110 detects a target object in the original training imageImg40 using circle detection and circles a bounding box of the detectedtarget object. Next, the processor 110 cuts the original training imageImg40 based on the bounding box to generate a processed image Img41. Inan embodiment, the processor 110 detects the target object in theoriginal training image Img40, using, for example, HoughCircles. In anembodiment, the processor 110 may take the center of the coordinate ofthe target object as the center and capture the image of the region ofinterest from specific image length and width around the target objectto generate a bounding box.

Angles of the Stinifer holes (i.e., the target object) included in theoriginal training images of the training data set are not necessarilythe same. Therefore, in another embodiment, the processor 110 may alsodetermine the angle of each processed image based on image intensityvalues of an image edge of the processed image (i.e., the cut image),and rotate each processed image based on the angles to the same angle.With reference to FIG. 4, a lower edge and a left edge of the processedimage Img41 are two edges along which the Stinifer holes extend, so theimage intensity values of the lower edge and the left edge are higherthan those of an upper edge and a right edge. Here, the angle of theprocessed image Img41 can be determined based on the image intensityvalue of the edge of the image. In an embodiment, the processor 110rotates the processed image Img41 based on the image intensity value ofthe processed image Img41 to generate a processed image Img42.

FIG. 5 is a flowchart of a training data increment method according toan embodiment of the disclosure. After performing image preprocessing onthe images included in the training data set, a plurality of processedimages may be generated. The processor 110 selects any two processedimages from the plurality of processed images for data increment. Withreference to FIG. 5, the processor 110 sets the first image as a movingimage M1 and sets the second image as a fixed image F1. The imagecategory of the first image is a defective image and the image categoryof the second image is a non-defective image. The processor 110 inputsthe moving image M1 and the fixed image F1 into the image incrementmodel and generates an incremental image N1. The image increment modelincludes an image encoding model 501, spatial transform 503, and a lossfunction 504. In detail, the processor 110 inputs the moving image M1and the fixed image F1 to the image encoding model 501, and generates aregistration field 502. Next, the processor 110 generates theincremental image N1 using the spatial transform 503 based on the movingimage M1 and the registration field 502. The loss function 504 may beset as the objective function when training the image increment model.In an embodiment, since the image category of the moving image M1 is adefective image, the processor 110 labels the image category of thegenerated incremental image N1 as a defective image.

FIG. 6 is a schematic diagram of a registration field according to anembodiment of the disclosure. For the registration field correspondingto the moving image M1 and the fixed image F1, reference may be made toFIG. 6.

After a plurality of incremental images including the incremental imageN1 are trained, the processor 110 inputs the processed images in thetraining data set (e.g., the processed image Img41, the processed imageImg42, the moving image M1, and/or the fixed Image F1) and theincremental image to the deep learning model and trains the deeplearning model. After the deep learning model is trained, the processor110 may execute a Stinifer hole defect detection program using thetrained deep learning model.

In an embodiment, detecting the continuous tin electrodeposit problem ofan electronic panel is described. FIG. 7 is a schematic diagram of imagepreprocessing according to an embodiment of the disclosure. In FIG. 7,first, the processor 110 obtains a training data set. The training dataset includes a plurality of original training images labeled as thedefective images and the non-defective images, respectively. Theprocessor 110 then performs image preprocessing on the original trainingimage. Since the continuous tin electrodeposit problem occurs betweenpins of the electronic panel, during image preprocessing, the processor110 detects the target object in the original training image using imagerecognition and sets an object number corresponding to the targetobject. With an original training image Img70 in the training data setas an example, the processor 110 detects pins in the original trainingimage Img70 using image recognition and sets pin numbers correspondingto the pins. The image Img72 shows the recognized pins and pin numbers 0to 39 corresponding to the pins. In other embodiments, the processor 110may first convert the original training image Img70 into a grayscaleimage Img71, then recognize pins in the grayscale image Img71, andperform a subsequent cutting step.

Next, the processor 110 cuts the original training image Img70 based onthe pin number to generate a processed image Img73 (i.e., cut image). Inan embodiment, the processor 110 uses a pin 26 and a pin 27 as a groupto capture the processed image Img73 from the original training imageImg70. In an embodiment, the processor 110 takes, for example, thecenter of the coordinates of two pins as the center, captures the imageof the region of interest from specific image length and width aroundthe pin to generate a bounding box, and captures the processed imageImg73 from the original training image Img70 based on the bounding box.In an embodiment, the processor 110 may determine the angle of eachprocessed image based on a length and a width of the cut image, androtate each processed image to the same angle based on the angles. In anembodiment, the processor 110 determines whether the processed imageincludes continuous tin electrodeposit defects using image recognition.If the processed image includes continuous tin electrodeposit defects,the processor 110 labels the image category of the processed image as adefective image. If the cut image does not include the continuous tinelectrodeposit defects, the processor 110 labels the image category ofthe processed image as a non-defective image.

FIG. 8 is a flowchart of a training data increment method according toan embodiment of the disclosure. After performing image preprocessing onthe images included in the training data set, a plurality of processedimages may be generated. The processor 110 selects any two images fromthe plurality of processed images for data increment. With reference toFIG. 8, the processor 110 sets the first image as a moving image M2, andsets the second image as a fixed image F2. The image category of thefirst image is a non-defective image, and the image category of thesecond image is a defective image. The processor 110 inputs the movingimage M2 and the fixed image F2 into the image increment model andgenerates an incremental image N2. The image increment model includes animage encoding model 801, spatial transform 803, and a loss function804. In detail, the processor 110 inputs the moving image M2 and thefixed image F2 to the image encoding model 801, and generates aregistration field 802. Next, the processor 110 generates an incrementalimage N2 using the spatial transform 803 based on the moving image M2and the registration field 802. The loss function 804 may be set as theobjective function when training the image increment model. In anembodiment, since the image category of the fixed image F2 is adefective image, the processor 110 labels the image category of thegenerated incremental image N2 as a defective image.

FIG. 9 is a schematic diagram of a registration field according to anembodiment of the disclosure. For a practical example of theregistration field corresponding to the moving image M2 and the fixedimage F2, reference may be made to the registration field 902 in FIG. 9.

FIG. 10 is a schematic diagram of generating a training image accordingto an embodiment of the disclosure. In this example, after a pluralityof incremental images including an incremental image N2 is trained, theprocessor 110 generates a training image based on the incremental imageand the original training image. With reference to FIG. 10, theprocessor 110 overlays the generated incremental image back to theoriginal training image Img70 (or the grayscale image Img71) at pinpositions of any two pins (as indicated by a box 1001) to generate atraining Image Img74. In addition, the processor 110 labels the imagecategory of the training image based on the image category of theincremental image. If at least one of the image category of theincremental image for overlaying or the image category of the overlaidgrayscale image is a defective image, the processor 110 labels thegenerated training image as a defective image. In this way, the trainingdata increment method provided by an embodiment can realize that thereis no change in other positions with the exception of the continuous tinelectrodeposit appearing on the pin positions in the image. Accordingly,the problem of image distortion during data increment can be reduced,and it can control at will to allow the continuous tin electrodeposit toappear on any pin.

Finally, the processor 110 inputs the original training image and thetraining image (e.g., the training image Img74) in the training data setto the deep learning model, and trains the deep learning model. Afterthe deep learning model is trained, the processor 110 may perform thecontinuous tin electrodeposit defect detection program using the traineddeep learning model.

This application also provides a non-transitory computer-readablemedium, in which a computer program is recorded. The computer program isused to execute various steps of the training data increment methodabove. This computer program consists of a plurality of code fragments(such as organization chart creation code fragments, signing form codefragments, setting code fragments, and deploying code fragments), andthe steps of the training data increment method above can be completedafter these code fragments are loaded into the electronic apparatus.

Based on the above, the training data increment method, the electronicapparatus, and the computer-readable medium provided by the disclosurecan use a small number of images in the training data set to generate aplurality of incremental images. In this way, the amount of trainingdata for training the deep learning model can be increased to improvethe object defect detection accuracy.

Although the disclosure is described above with embodiments, theembodiments are not intended to limit the disclosure. Any person ofordinary skill in the art may make variations and modifications withoutdeparting from the spirit and scope of the disclosure. The protectionscope of the disclosure should be subject to the appended claims.

What is claimed is:
 1. A training data increment method, adapted for anelectronic apparatus, the method comprising: obtaining a training dataset, wherein the training data set comprises a first image and a secondimage; generating an incremental image based on the first image and thesecond image generating a vector field associated with a plurality ofpixels of the second image based on the first image; generating anincremental image based on the first image and the vector field; andtraining a deep learning model based on the incremental image.
 2. Thetraining data increment method according to claim 1, wherein the step ofgenerating the vector field associated with the plurality of pixels ofthe second image based on the first image comprises: minimizing anobjective function of the vector field to generate a registration fieldcorresponding to the first image and the second image.
 3. The trainingdata increment method according to claim 2, wherein the step ofgenerating the incremental image based on the first image and the vectorfield comprises: performing a spatial transform operation on the firstimage using the registration field to generate the incremental image. 4.The training data increment method according to claim 2, wherein theobjective function is a similarity between the first image and thesecond image and smoothness of the vector field.
 5. The training dataincrement method according to claim 1, wherein the method furthercomprises: determining an image category of the incremental image basedon image categories of the first image and the second image, wherein theimage category comprises a defective image and a non-defective image. 6.The training data increment method according to claim 1, wherein beforethe step of generating the vector field associated with the plurality ofpixels of the second image based on the first image, the method furthercomprises: performing image preprocessing on a plurality of originaltraining images comprised in the training data set to obtain a pluralityof processed images, wherein the plurality of processed images comprisethe first image and the second image.
 7. The training data incrementmethod according to claim 6, wherein the step of performing the imagepreprocessing on the plurality of original training images comprised inthe training data set to obtain the plurality of processed imagescomprises: detecting target objects in the plurality of originaltraining images using circle detection, and circling bounding boxes ofthe detected target objects; and cutting the plurality of originaltraining images based on the bounding boxes, and generating theplurality of processed images.
 8. The training data increment methodaccording to claim 7, wherein the step of cutting the plurality oforiginal training images based on the bounding boxes and generating theplurality of processed images comprises: cutting the plurality oforiginal training images based on the bounding boxes, and generating aplurality of cut images; determining an angle of each of the pluralityof cut images based on image intensity values of image edges of theplurality of cut images; and rotating each of the plurality of cutimages based on the angle of each of the plurality of cut images, andgenerating the plurality of processed images.
 9. The training dataincrement method according to claim 7, wherein the step of training thedeep learning model based on the incremental image comprises: inputtingthe plurality of processed images and the incremental image to the deeplearning model and training the deep learning model.
 10. The trainingdata increment method according to claim 6, wherein the step ofperforming the image preprocessing on the plurality of original trainingimages comprised in the training data set to obtain the plurality ofprocessed images comprises: detecting target objects in the plurality oforiginal training images using image recognition and setting objectnumbers of the target objects; and cutting the plurality of originaltraining images based on the object numbers, and generating theplurality of processed images.
 11. The training data increment methodaccording to claim 10, wherein the step of training the deep learningmodel based on the incremental image further comprises: generating atraining image based on the incremental image and the plurality oforiginal training images; and inputting the plurality of originaltraining images and the training image to the deep learning model andtraining the deep learning model.
 12. The training data increment methodaccording to claim 11, wherein the step of generating the training imagebased on the incremental image and the plurality of original trainingimages comprises: overlaying the incremental image to the plurality oforiginal training images and generating the training image.
 13. Thetraining data increment method according to claim 11, wherein the methodfurther comprises: determining an image category of the training imagebased on an image category of the incremental image.
 14. The trainingdata increment method according to claim 1, wherein after the step oftraining the deep learning model based on the incremental image, themethod further comprises: performing an image detection program usingthe trained deep learning model.
 15. An electronic apparatus,comprising: a storage apparatus; and a processor, coupled to the storageapparatus, and configured to execute instructions in the storageapparatus to: obtain a training data set, wherein the training data setcomprises a first image and a second image; generate an incrementalimage based on the first image and the second image generate a vectorfield associated with a plurality of pixels of the second image based onthe first image; generate an incremental image based on the first imageand the vector field; and train a deep learning model based on theincremental image.
 16. The electronic apparatus according to claim 15,wherein the processor is configured to minimize an objective function ofa vector field to generate a registration field corresponding to thefirst image and the second image.
 17. The electronic apparatus accordingto claim 16, wherein the processor is configured to perform a spatialtransform operation on the first image using the registration field togenerate the incremental image.
 18. The electronic apparatus accordingto claim 16, wherein the objective function is a similarity between thefirst image and the second image and smoothness of the vector field. 19.The electronic apparatus according to claim 15, wherein the processor isfurther configured to perform image preprocessing on a plurality oforiginal training images comprised in the training data set to obtain aplurality of processed images, wherein the plurality of processed imagescomprise the first image and the second image.
 20. A non-transitorycomputer-readable medium, recording programs, and loaded in anelectronic apparatus to perform the following steps: obtaining atraining data set, wherein the training data set comprises a first imageand a second image; generating an incremental image based on the firstimage and the second image generate a vector field associated with aplurality of pixels of the second image based on the first image;generate an incremental image based on the first image and the vectorfield; and training a deep learning model based on the incrementalimage.